package com.hspedu.printstream;

import java.io.IOException;
import java.io.PrintStream;

/**
 * @author LiuJinTao
 * @className PrintStream_
 * @date 2024/06/28 16:01
 * @description TODO
 */
public class PrintStream_ {
    public static void main(String[] args) throws IOException {
        PrintStream out = System.out;
        // 默认情况下，标准输出，显示器
        out.println(" jscnscocs");
        // 底层调用 write()
        out.write("jsdndww".getBytes());
        out.close();

        // 修改字节打印流输出位置
        System.setOut(new PrintStream("e:\\c.txt"));
        System.out.println("haliucdcneivdnvv");
    }
}
